'''
Created on Oct 15, 2009

@author: Owner
'''
import __builtin__
import utility

class GamePhase(object):
    '''
    classdocs
    '''

    def __init__(self):
        '''
        Constructor
        '''
    
    def execute(self):
        raise NotImplementedError("execute")
       
   
    
class GamePhaseWonder(GamePhase):
    
    def __init__(self):
        '''
        Constructor
        '''
        self.count = 0
        self.timer = 4
    
    def execute(self):
        if self.count != 0:
            if self.timer == 5:            
                print(self.count)
                self.count += 1
                self.timer = 0
            
        else:
            print("Ok, I will count number now, if you wanna me stop" \
                  ", just tell me by pressing Enter")
            self.count += 1
            
        if utility.kbfunc() == 13:
                __builtin__.G.game_phase = GamePhaseEnd()
        self.timer+=1         

        
class GamePhaseEnd(GamePhase):
    
    def __init__(self):
        '''
        Constructor
        '''
        self.count = 0
    
    def execute(self):
        __builtin__.G.game_phase = None
        
